first log in to the alibaba cloud console, enter the ecs console and select the region where your instance belongs (for example , ap-southeast-1 singapore). after locating the target instance, view the associated security group and click "configure rules" or "security group rules". select "add security group rule" in "inbound rules", fill in the protocol (tcp/udp/all), port range (such as 22, 80, 443 or a custom port such as 8080), authorization object (it is recommended to fill in a specific ip whitelist or cidr, such as 1.2.3.4/32) and purpose description, and then save.
pay attention to also check whether the operating system firewall (such as iptables, ufw or firewalld) in the instance and the application are listening on the corresponding port. if the instance uses an elastic public ip (eip), ensure that the eip has been correctly bound and that the routing table/subnet does not restrict external access.
alibaba cloud security groups are instance-based virtual firewalls that are usually stateful: once incoming connections are allowed, reply traffic will be automatically allowed. there is no explicit priority between security group rules; rules are evaluated in parallel and take effect as long as one rule matches. security groups do not support explicit "deny" rules and can only be restricted by default.
when designing a whitelist, it is recommended to follow the principle of least privilege: only allow fixed management ip or vpn address segments for management ports (such as 22 /ssh, 3389/rdp); consider allowing 0.0.0.0/0 for web services (80/443) but combining waf and current limiting strategies; try to only allow internal network segments or access through dedicated vpc lines for database ports (such as 3306, 27017).
common risks include: default ports being brute force cracked, databases being directly exposed leading to data leaks, services that have not been patched in time being exploited for vulnerability attacks, and ddos or crawler traffic overwhelming services. protective measures include:

(1) enable key authentication for management ports, disable password login, modify the default port and use port knocking or two-factor authentication; (2) use a security group whitelist to restrict source ips and cooperate with the centralized operation and maintenance audit of the bastion host; (3) deploy alibaba cloud waf, ddos advanced defense or cloud firewall to filter and clean internet traffic; (4) enable fail2ban, iptables/ufw at the host level rules limit frequent attempts; (5) only intranet access or private connection access to the database is allowed, and account complexity and encrypted transmission are enabled.
automated management can be achieved using the alibaba cloud command line (aliyuncli) or sdk. common operations include: authorizesecuritygroup (add rule), revokesecuritygroup (delete rule), describesecuritygroupattribute (view rule). example (pseudo command, only showing parameters):
aliyun ecs authorizesecuritygroup --regionid ap-southeast-1 --securitygroupid sg-xxxx --ipprotocol tcp --portrange 8080/8080 --sourcecidrip 203.0.113.4/32 --policy accept
in batch scenarios, it is recommended to first use the describe interface to export the current rules, generate a change plan (json/csv), and then perform batch authorization or revocation after verification in the test environment. pay attention to operation permission control (ram roles and policies) to avoid accidentally deleting core rules in the production environment; you can also cooperate with terraform or alibaba cloud resource orchestration (ros) for declarative management.
it is recommended that the troubleshooting steps are in order from outside to inside: ① confirm that the instance status is normal and has been bound to the public ip (if public network access is required); ② check whether the security group inbound/outbound direction rules allow the corresponding protocol and port in the alibaba cloud console; ③ check whether the vpc subnet routing table and network acl (network acl) block traffic; ④ check the operating system firewall (iptables/ufw/firewalld) and selinux in the instance settings; ⑤ confirm that the service process is listening on the target port (use ss -ltnp or netstat -lnt); ⑥ use telnet/ nc/ nmap from the outside test port connectivity, and try to access from different regions or through alibaba cloud performance monitoring to troubleshoot regional or bgp issues; 7. if there are still problems, you can capture packets (tcpdump) or check application and system logs. if necessary, enable security group logs, alibaba cloud monitoring alarms, or submit a work order to request alibaba cloud network side diagnosis.
during the investigation process, the results and time points of each step should be recorded to facilitate backtracking and recurrence. frequent connection failures should also be combined with intrusion detection and application logs to check whether there are malicious scans or attacks.
- Latest articles
- Before Choosing A Hong Kong High-defense Exemption Server, You Need To Pay Attention To Security And Contract Terms
- Experts Recommend Paying Attention To ISP And Routing Issues When Assessing The Speed Of Vietnamese VPS
- Cost Control Tips For Korean CN2 Site Clusters: Bandwidth Billing And Resource Allocation Recommendations
- Common Causes Of Tencent Cloud Singapore Server Failures And Best Practices For Prevention
- Evaluation Of The Capabilities Of Singapore Cloud Server CN2 Service Providers In Supporting Cross-border Business
- Case Study Of Application Of Hong Kong Sha Tin CN2 Console In Game Acceleration And Live Streaming
- Judging From Case Studies Whether US High-defense Servers Are Resistant To Complaints: Complaint Types And Final Handling Results Statistics
- Remote Management Practice: US VPS Windows 2003 Remote Desktop And Permission Configuration Instructions
- Key Points Reflected In The Malaysian Cloud Server Price List Comparing Nodes From Different Regions
- A Guide To Choosing Which Cloud Server To Use In Vietnam To Meet Regulatory Compliance And Data Residency Requirements
- Popular tags
-
Buying Guide: Which Cloud Servers In Singapore Are Suitable For Start-ups And Medium-sized Enterprises?
the "singapore cloud server buying guide" for start-ups and medium-sized enterprises helps you make a wise choice between aws/gcp/local cloud from the perspectives of performance, price, security, compliance and technical support. -
How Can Enterprises Choose The Right Model To Rent A Cloud Server In Singapore To Achieve Elastic Scaling?
when enterprises rent cloud servers in singapore, it focuses on how to choose the right model to achieve elastic scaling. it provides practical suggestions and precautions by answering five questions one by one, including demand assessment, instance type comparison, billing and performance trade-offs, network storage and availability impacts, and automation and monitoring strategies. -
Singapore Cloud Server Price Analysis And Selection Guide
this article analyzes the price of cloud servers in singapore in detail and provides a selection guide to help users make informed decisions among many service providers.